package com.dengdai.applibrary.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * @说明 头部指示器数据源
 * @作者 LY
 * @时间 16/5/26 09:45
 * @邮箱 2743569843@qq.com
 * @版权 Copyright(c) 2016 LY-版权所有
 * @备注
 */
public class TopIndicatorAdapter extends FragmentPagerAdapter {
    public List<String> listTop;
    public List<Fragment> listFragment;

    public TopIndicatorAdapter(FragmentManager fm) {
        super(fm);
        listTop = new ArrayList<String>();
        listFragment = new ArrayList<Fragment>();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return listTop.get(position);
    }

    @Override
    public int getCount() {
        return listTop.size();
    }

    @Override
    public Fragment getItem(int arg0) {
        return listFragment.get(arg0);
    }
}
